# -*- encoding=utf8 -*-
        
__author__ = "Bryan.Chen"
__desc__=""
        
from airtest.core.api import *
        
auto_setup(__file__)
        
from poco.drivers.std import StdPoco
poco = StdPoco()
        
using("../FlowTest.air")
import FlowTest
        
class SubGame_CreateRoom(FlowTest.BaseTestCase):
    def __init__(self):
        print("%s __init__" % (__file__))
        
    def runTest(self, args):
        print("%s runTest" % (__file__))
        btnCreateRoom = poco("Button_CreateRoom")
        if not btnCreateRoom.exists():
            return False
            
        self.clickButton(btnCreateRoom)

        commonCreateRoomLayer = poco("CommonCreateRoomLayer")
        if not commonCreateRoomLayer.exists():
            return False
        
        btnStart = commonCreateRoomLayer.offspring("Button_Start")
        if not btnStart.exists():
            return False
        
        self.clickButton(btnStart)
        
        return True
        
_instance = SubGame_CreateRoom()
runTest = _instance.runTest
